package com.hdoit.apollo.logical.shop.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.springframework.util.StringUtils;

import com.tennetcn.core.common.utils.ChineseUtils;
import com.tennetcn.data.message.ModelBase;
/**
 * @author      humaoshu
 * @email       
 * @createtime  2018年05月22日 10:01:58
 * @comment
 */
@Entity
@Table(name="shop_supplier")
public class Supplier extends ModelBase{
    /**
     *主键
     */
    @Id
    @Column(name="supplierId")
    private String supplierId;

    /**
     *供应商名称
     */
    @Column(name="supplierName")
    private String supplierName;

    /**
     *供应商编码
     */
    @Column(name="supplierNo")
    private String supplierNo;

    /**
     *区域
     */
    @Column(name="region")
    private String region;

    /**
     *详细地址
     */
    @Column(name="address")
    private String address;

    /**
     *联系人姓名
     */
    @Column(name="contactName")
    private String contactName;

    /**
     *手机
     */
    @Column(name="contentPhone")
    private String contentPhone;

    /**
     *电话
     */
    @Column(name="contentTel")
    private String contentTel;

    /**
     *职位
     */
    @Column(name="position")
    private String position;

    /**
     *邮箱
     */
    @Column(name="email")
    private String email;

    /**
     *开户银行
     */
    @Column(name="openingBank")
    private String openingBank;

    /**
     *开户名称
     */
    @Column(name="openAccount")
    private String openAccount;

    /**
     *银行账户
     */
    @Column(name="bankAccount")
    private String bankAccount;

    /**
     *发票抬头
     */
    @Column(name="invoice")
    private String invoice;

    /**
     *门店
     */
    @Column(name="shopId")
    private String shopId;

    /**
     *备注
     */
    @Column(name="comment")
    private String comment;

    /**
     *创建时间
     */
    @Column(name="createDate")
    private Date createDate;

    /**
     *创建人
     */
    @Column(name="createUserId")
    private String createUserId;

    /**
     *创建人名称
     */
    @Column(name="createUserName")
    private String createUserName;

    /**
     *修改时间
     */
    @Column(name="modifyDate")
    private Date modifyDate;

    /**
     *修改人
     */
    @Column(name="modifyUserId")
    private String modifyUserId;

    /**
     *修改人名称
     */
    @Column(name="modifyUserName")
    private String modifyUserName;

    /**
     *删除标记
     */
    @Column(name="deleteMark")
    private Integer deleteMark;
    
    @Transient
    private String letter;
    
    public String getLetter() {
    	if(!StringUtils.isEmpty(this.supplierName)){
    		return ChineseUtils.getPinYinHeadChar(this.supplierName).toUpperCase();
    	}
    	return this.letter;
	}
	public void setLetter(String letter) {
		this.letter = letter;
	}
	public String getSupplierId(){
        return this.supplierId;
    }
    public void setSupplierId(String supplierId){
         this.supplierId=supplierId;
    }

    public String getSupplierName(){
        return this.supplierName;
    }
    public void setSupplierName(String supplierName){
         this.supplierName=supplierName;
    }

    public String getSupplierNo(){
        return this.supplierNo;
    }
    public void setSupplierNo(String supplierNo){
         this.supplierNo=supplierNo;
    }

    public String getRegion(){
        return this.region;
    }
    public void setRegion(String region){
         this.region=region;
    }

    public String getAddress(){
        return this.address;
    }
    public void setAddress(String address){
         this.address=address;
    }

    public String getContactName(){
        return this.contactName;
    }
    public void setContactName(String contactName){
         this.contactName=contactName;
    }

    public String getContentPhone(){
        return this.contentPhone;
    }
    public void setContentPhone(String contentPhone){
         this.contentPhone=contentPhone;
    }

    public String getContentTel(){
        return this.contentTel;
    }
    public void setContentTel(String contentTel){
         this.contentTel=contentTel;
    }

    public String getPosition(){
        return this.position;
    }
    public void setPosition(String position){
         this.position=position;
    }

    public String getEmail(){
        return this.email;
    }
    public void setEmail(String email){
         this.email=email;
    }

    public String getOpeningBank(){
        return this.openingBank;
    }
    public void setOpeningBank(String openingBank){
         this.openingBank=openingBank;
    }

    public String getOpenAccount(){
        return this.openAccount;
    }
    public void setOpenAccount(String openAccount){
         this.openAccount=openAccount;
    }

    public String getBankAccount(){
        return this.bankAccount;
    }
    public void setBankAccount(String bankAccount){
         this.bankAccount=bankAccount;
    }

    public String getInvoice(){
        return this.invoice;
    }
    public void setInvoice(String invoice){
         this.invoice=invoice;
    }

    public String getShopId(){
        return this.shopId;
    }
    public void setShopId(String shopId){
         this.shopId=shopId;
    }

    public String getComment(){
        return this.comment;
    }
    public void setComment(String comment){
         this.comment=comment;
    }

    public Date getCreateDate(){
        return this.createDate;
    }
    public void setCreateDate(Date createDate){
         this.createDate=createDate;
    }

    public String getCreateUserId(){
        return this.createUserId;
    }
    public void setCreateUserId(String createUserId){
         this.createUserId=createUserId;
    }

    public String getCreateUserName(){
        return this.createUserName;
    }
    public void setCreateUserName(String createUserName){
         this.createUserName=createUserName;
    }

    public Date getModifyDate(){
        return this.modifyDate;
    }
    public void setModifyDate(Date modifyDate){
         this.modifyDate=modifyDate;
    }

    public String getModifyUserId(){
        return this.modifyUserId;
    }
    public void setModifyUserId(String modifyUserId){
         this.modifyUserId=modifyUserId;
    }

    public String getModifyUserName(){
        return this.modifyUserName;
    }
    public void setModifyUserName(String modifyUserName){
         this.modifyUserName=modifyUserName;
    }

    public Integer getDeleteMark(){
        return this.deleteMark;
    }
    public void setDeleteMark(Integer deleteMark){
         this.deleteMark=deleteMark;
    }

}